# Copyright 2025 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Generate data for mcore norm UT of inference."""
import numpy as np


def get_init_params(batch_size, seq_length, hidden_size):
    """Generate initialization parameters"""
    np.random.seed(2025)
    tensor_shape = (batch_size * seq_length, hidden_size)
    return {
        "input": np.random.normal(loc=0, scale=0.01, size=tensor_shape),
        "weight": np.random.normal(loc=0, scale=0.01, size=hidden_size)
    }


def get_golden() -> dict[str, np.ndarray]:
    """Generate golden data for test."""
    layernorm_output1 = np.array(
        [[-1.0876954e-03, -4.9849157e-03, 1.4903446e-02, 3.1792079e-03,
          1.5672084e-03, 1.2284668e-02, 1.5344125e-02, -2.8124431e-04,
          -1.4318664e-02, 3.1736360e-03, -5.3833458e-03, -2.0757834e-03,
          1.8313194e-02, 1.2753200e-04, 6.4855005e-05, -2.0047517e-03,
          6.4094011e-03, -1.7668784e-04, 9.3266147e-04, 2.7859448e-03,
          -3.8331235e-03, 3.9917072e-03, -2.0200959e-03, 3.4959686e-03,
          -1.4490915e-04, -1.3173183e-03, 2.0928506e-04, -2.5911932e-04,
          1.9716373e-02, 1.0514779e-03, 1.3338776e-02, 1.8304721e-03],
         [1.1349696e-03, 5.8242041e-03, -7.7638943e-03, -1.4979683e-03,
          3.0182968e-03, -3.1547195e-03, -6.7861656e-05, 7.6689664e-04,
          -1.6504839e-02, -1.7752409e-02, 9.3135517e-03, -1.3228039e-03,
          1.7757392e-02, -1.8104978e-03, 5.4993975e-04, 1.0357582e-03,
          -3.4741827e-03, -9.4610099e-03, 2.0769994e-04, 9.9569494e-03,
          1.3738023e-03, 2.1550577e-02, 9.1478024e-03, 5.7605854e-03,
          -7.2572739e-03, 1.4433576e-04, 1.2901276e-03, 5.4275529e-03,
          1.5565772e-02, 1.1618170e-02, 1.7907646e-02, 1.0409021e-03],
         [-3.4562574e-04, 3.6819242e-03, -1.6032288e-02, -1.6093524e-03,
          1.4678314e-02, 3.9865132e-03, -1.2405995e-02, 2.3727962e-03,
          1.6830854e-02, -1.8498630e-03, 2.7304997e-03, -1.0979658e-03,
          1.1235957e-02, -7.2000461e-04, -5.7179341e-04, 1.5516523e-03,
          -5.9370003e-03, 8.3337054e-03, -1.0079475e-03, 1.5330643e-02,
          -7.9159316e-04, 7.7008316e-03, 6.9080200e-03, 1.1610064e-03,
          1.0058311e-02, 9.8283240e-04, 3.4585083e-03, -1.8041816e-03,
          -3.0517057e-03, -7.4460097e-03, 6.4640506e-03, 3.7037430e-04],
         [-4.8868656e-03, -7.1780267e-04, 1.4544663e-03, 8.4863454e-03,
          -1.5246118e-02, 8.0256891e-03, -6.4398199e-03, 8.1209978e-04,
          -8.0126384e-03, -6.7692976e-03, -1.0973393e-03, 2.0730922e-03,
          2.3635253e-02, -7.6173100e-04, 4.5692862e-04, -6.4003345e-04,
          7.2239018e-03, -5.5040815e-03, -4.4621220e-03, 9.9184969e-04,
          2.2083542e-03, 6.9241920e-03, -1.9521717e-02, -3.6684815e-03,
          4.0654456e-03, 1.2983867e-03, 8.1426487e-04, -8.6909132e-03,
          -8.2037793e-03, -3.0697056e-03, 1.9294450e-02, -1.0549842e-03]], dtype=np.float32
    )

    layernorm_output2 = np.array(
        [[-3.24114008e-05, -1.48541701e-04, 4.44096338e-04,
          9.47347944e-05, 4.67000464e-05, 3.66061460e-04,
          4.57227870e-04, -8.38058440e-06, -4.26670915e-04,
          9.45687570e-05, -1.60414216e-04, -6.18546910e-05,
          5.45700896e-04, 3.80022834e-06, 1.93256460e-06,
          -5.97380640e-05, 1.90988867e-04, -5.26498570e-06,
          2.77916679e-05, 8.30162462e-05, -1.14220311e-04,
          1.18945834e-04, -6.01952961e-05, 1.04173698e-04,
          -4.31803710e-06, -3.92537622e-05, 6.23632604e-06,
          -7.72129806e-06, 5.87513088e-04, 3.13321834e-05,
          3.97472031e-04, 5.45448420e-05],
         [3.63289255e-05, 1.86425314e-04, -2.48512340e-04,
          -4.79480477e-05, 9.66118241e-05, -1.00978534e-04,
          -2.17216484e-06, 2.45473802e-05, -5.28298784e-04,
          -5.68231917e-04, 2.98114843e-04, -4.23412603e-05,
          5.68391348e-04, -5.79517218e-05, 1.76028680e-05,
          3.31532938e-05, -1.11204135e-04, -3.02834786e-04,
          6.64820936e-06, 3.18709208e-04, 4.39736505e-05,
          6.89806417e-04, 2.92809476e-04, 1.84388977e-04,
          -2.32296050e-04, 4.62000344e-06, 4.12953377e-05,
          1.73729015e-04, 4.98240406e-04, 3.71882750e-04,
          5.73200814e-04, 3.33179451e-05],
         [-1.01489477e-05, 1.08115935e-04, -4.70771804e-04,
          -4.72569882e-05, 4.31013701e-04, 1.17059884e-04,
          -3.64289386e-04, 6.96747375e-05, 4.94220818e-04,
          -5.43193382e-05, 8.01783390e-05, -3.22406449e-05,
          3.29932402e-04, -2.11422011e-05, -1.67901308e-05,
          4.55626905e-05, -1.74333953e-04, 2.44710740e-04,
          -2.95973514e-05, 4.50168707e-04, -2.32443253e-05,
          2.26127057e-04, 2.02846946e-04, 3.40917686e-05,
          2.95352016e-04, 2.88598712e-05, 1.01555561e-04,
          -5.29779463e-05, -8.96102210e-05, -2.18644476e-04,
          1.89810235e-04, 1.08756640e-05],
         [-1.75097724e-04, -2.57190677e-05, 5.21139227e-05,
          3.04068060e-04, -5.46272611e-04, 2.87562638e-04,
          -2.30740494e-04, 2.90977569e-05, -2.87094997e-04,
          -2.42545779e-04, -3.93179689e-05, 7.42794582e-05,
          8.46857554e-04, -2.72930301e-05, 1.63718778e-05,
          -2.29325724e-05, 2.58834363e-04, -1.97212750e-04,
          -1.59879040e-04, 3.55382435e-05, 7.91259372e-05,
          2.48095690e-04, -6.99468364e-04, -1.31442692e-04,
          1.45666025e-04, 4.65215489e-05, 2.91753313e-05,
          -3.11397802e-04, -2.93943653e-04, -1.09988388e-04,
          6.91325346e-04, -3.78003715e-05]], dtype=np.float32
    )

    rmsnorm_output1 = np.array(
        [[-9.15358076e-04, -5.10486960e-03, 1.47231175e-02,
          3.09753907e-03, 1.33640738e-03, 1.23827988e-02,
          1.55352037e-02, -2.59456312e-04, -1.46495942e-02,
          3.46687483e-03, -5.29410644e-03, -2.03277636e-03,
          1.80130694e-02, 1.06634841e-04, 7.28453088e-05,
          -1.98513386e-03, 6.51475601e-03, -3.32127151e-04,
          8.43049318e-04, 2.64541828e-03, -3.87484487e-03,
          3.65464878e-03, -1.84348319e-03, 3.58207524e-03,
          -5.66657218e-06, -1.34701887e-03, 2.61478184e-04,
          -3.51172552e-04, 2.00025253e-02, 8.20188085e-04,
          1.30841555e-02, 1.80525123e-03],
         [5.21276554e-04, 6.24064589e-03, -7.11595360e-03,
          -1.20669429e-03, 3.83038586e-03, -3.50379455e-03,
          -7.55427696e-04, 6.88060012e-04, -1.52858021e-02,
          -1.87574755e-02, 8.97997525e-03, -1.47142273e-03,
          1.87739450e-02, -1.73249491e-03, 5.20350877e-04,
          9.65090003e-04, -3.84468166e-03, -8.88870750e-03,
          5.24877687e-04, 1.04328962e-02, 1.52130972e-03,
          2.26987712e-02, 8.50231759e-03, 5.44039393e-03,
          -7.73603888e-03, 2.50277983e-04, 1.10191479e-03,
          5.74292894e-03, 1.45044867e-02, 1.24138724e-02,
          1.87653042e-02, 1.12711918e-03],
         [-3.51644470e-03, 5.69991674e-03, -1.17711956e-02,
          -8.41349902e-06, 1.80689525e-02, 1.88864488e-03,
          -1.52501864e-02, 1.82694616e-03, 2.19983011e-02,
          -7.18502421e-03, 9.28676862e-04, -1.82268629e-03,
          1.60662830e-02, -2.89653195e-04, -6.85722567e-04,
          1.10087858e-03, -7.55310012e-03, 1.07144937e-02,
          7.11139408e-04, 1.70045476e-02, 4.16117618e-05,
          1.34737110e-02, 3.22433887e-03, -5.16236410e-04,
          6.87196152e-03, 1.47846364e-03, 2.28207931e-03,
          1.18303951e-05, -8.23521614e-03, -2.71322043e-03,
          1.07535934e-02, 8.09904246e-04],
         [-4.43990203e-03, -1.02680491e-03, 9.96864401e-04,
          8.26879870e-03, -1.58203114e-02, 8.27373471e-03,
          -5.93590131e-03, 8.66947288e-04, -8.85862205e-03,
          -6.00831071e-03, -8.69595038e-04, 2.18016771e-03,
          2.28471123e-02, -8.14417028e-04, 4.76938207e-04,
          -5.89879288e-04, 7.48881185e-03, -5.89664653e-03,
          -4.68654884e-03, 6.31560048e-04, 2.09721737e-03,
          6.05377275e-03, -1.90478377e-02, -3.44203087e-03,
          4.41794051e-03, 1.22019206e-03, 9.47300519e-04,
          -8.91739316e-03, -7.45216105e-03, -3.65898223e-03,
          1.86256934e-02, -1.11768954e-03]], dtype=np.float32
    )

    rmsnorm_output2 = np.array(
        [[-2.7280685e-05, -1.5214192e-04, 4.3879737e-04, 9.2316863e-05,
          3.9829341e-05, 3.6904812e-04, 4.6300024e-04, -7.7326522e-06,
          -4.3660615e-04, 1.0332428e-04, -1.5778182e-04, -6.0583425e-05,
          5.3684873e-04, 3.1780694e-06, 2.1710300e-06, -5.9163525e-05,
          1.9416117e-04, -9.8984829e-06, 2.5125644e-05, 7.8842175e-05,
          -1.1548313e-04, 1.0892057e-04, -5.4941873e-05, 1.0675764e-04,
          -1.6888251e-07, -4.0145598e-05, 7.7929108e-06, -1.0466098e-05,
          5.9614104e-04, 2.4444307e-05, 3.8995090e-04, 5.3802432e-05],
         [1.6721197e-05, 2.0018368e-04, -2.2826130e-04, -3.8707618e-05,
          1.2286881e-04, -1.1239261e-04, -2.4232155e-05, 2.2071177e-05,
          -4.9032876e-04, -6.0169108e-04, 2.8805426e-04, -4.7199414e-05,
          6.0221931e-04, -5.5573932e-05, 1.6691502e-05, 3.0957577e-05,
          -1.2332739e-04, -2.8512662e-04, 1.6836710e-05, 3.3466017e-04,
          4.8799662e-05, 7.2811759e-04, 2.7273223e-04, 1.7451370e-04,
          -2.4815204e-04, 8.0282671e-06, 3.5346562e-05, 1.8421821e-04,
          4.6526620e-04, 3.9820478e-04, 6.0194213e-04, 3.6155048e-05],
         [-1.0986257e-04, 1.7807970e-04, -3.6776171e-04, -2.6285886e-07,
          5.6451949e-04, 5.9006012e-05, -4.7645418e-04, 5.7078389e-05,
          6.8728212e-04, -2.2447819e-04, 2.9014202e-05, -5.6945300e-05,
          5.0195109e-04, -9.0494932e-06, -2.1423697e-05, 3.4394208e-05,
          -2.3597782e-04, 3.3474769e-04, 2.2217780e-05, 5.3126481e-04,
          1.3000559e-06, 4.2095257e-04, 1.0073645e-04, -1.6128522e-05,
          2.1469736e-04, 4.6190919e-05, 7.1297887e-05, 3.6961126e-07,
          -2.5728886e-04, -8.4767831e-05, 3.3596932e-04, 2.5303441e-05],
         [-1.5926064e-04, -3.6831807e-05, 3.5757832e-05, 2.9660435e-04,
          -5.6747941e-04, 2.9678142e-04, -2.1292260e-04, 3.1097665e-05,
          -3.1776150e-04, -2.1551995e-04, -3.1192641e-05, 7.8203288e-05,
          8.1953296e-04, -2.9213388e-05, 1.7107919e-05, -2.1159152e-05,
          2.6862600e-04, -2.1151455e-04, -1.6810794e-04, 2.2654252e-05,
          7.5227828e-05, 2.1715069e-04, -6.8325183e-04, -1.2346671e-04,
          1.5847289e-04, 4.3768669e-05, 3.3979959e-05, -3.1986966e-04,
          -2.6731135e-04, -1.3124882e-04, 6.6810934e-04, -4.0091869e-05]], dtype=np.float32
    )

    return {
        "layernorm_output1": layernorm_output1,
        "layernorm_output2": layernorm_output2,
        "rmsnorm_output1": rmsnorm_output1,
        "rmsnorm_output2": rmsnorm_output2,
    }


def get_gpu_data() -> dict[str, np.ndarray]:
    """Generate gpu data for test."""
    layernorm_output1 = np.array(
        [[-1.083e-03, -5.005e-03, 1.489e-02, 3.159e-03, 1.556e-03,
          1.227e-02, 1.532e-02, -2.823e-04, -1.428e-02, 3.174e-03,
          -5.402e-03, -2.075e-03, 1.831e-02, 1.268e-04, 6.485e-05,
          -2.014e-03, 6.378e-03, -1.812e-04, 9.308e-04, 2.777e-03,
          -3.830e-03, 3.998e-03, -2.014e-03, 3.494e-03, -1.411e-04,
          -1.320e-03, 2.108e-04, -2.632e-04, 1.978e-02, 1.045e-03,
          1.337e-02, 1.823e-03],
         [1.137e-03, 5.829e-03, -7.751e-03, -1.495e-03, 3.021e-03,
          -3.143e-03, -6.580e-05, 7.706e-04, -1.648e-02, -1.782e-02,
          9.338e-03, -1.320e-03, 1.782e-02, -1.801e-03, 5.493e-04,
          1.030e-03, -3.464e-03, -9.460e-03, 2.079e-04, 9.949e-03,
          1.373e-03, 2.161e-02, 9.155e-03, 5.737e-03, -7.263e-03,
          1.440e-04, 1.289e-03, 5.432e-03, 1.563e-02, 1.160e-02,
          1.794e-02, 1.045e-03],
         [-3.471e-04, 3.693e-03, -1.611e-02, -1.610e-03, 1.471e-02,
          3.998e-03, -1.239e-02, 2.380e-03, 1.685e-02, -1.854e-03,
          2.731e-03, -1.099e-03, 1.117e-02, -7.172e-04, -5.722e-04,
          1.549e-03, -5.951e-03, 8.362e-03, -1.007e-03, 1.532e-02,
          -7.935e-04, 7.721e-03, 6.927e-03, 1.160e-03, 1.007e-02,
          9.766e-04, 3.464e-03, -1.808e-03, -3.067e-03, -7.416e-03,
          6.439e-03, 3.700e-04],
         [-4.883e-03, -7.210e-04, 1.450e-03, 8.484e-03, -1.526e-02,
          7.996e-03, -6.439e-03, 8.163e-04, -7.996e-03, -6.775e-03,
          -1.099e-03, 2.075e-03, 2.368e-02, -7.629e-04, 4.578e-04,
          -6.409e-04, 7.202e-03, -5.493e-03, -4.486e-03, 9.918e-04,
          2.213e-03, 6.958e-03, -1.953e-02, -3.662e-03, 4.089e-03,
          1.305e-03, 8.163e-04, -8.728e-03, -8.179e-03, -3.067e-03,
          1.929e-02, -1.053e-03]], dtype=np.float16
    )

    layernorm_output2 = np.array(
        [[-3.2187e-05, -1.4877e-04, 4.4441e-04, 9.4414e-05,
          4.6492e-05, 3.6621e-04, 4.5586e-04, -8.4043e-06,
          -4.2534e-04, 9.4891e-05, -1.6022e-04, -6.1989e-05,
          5.4550e-04, 3.7551e-06, 1.9073e-06, -5.9843e-05,
          1.9073e-04, -5.4240e-06, 2.7776e-05, 8.2970e-05,
          -1.1444e-04, 1.1873e-04, -6.0081e-05, 1.0395e-04,
          -4.1723e-06, -3.9339e-05, 6.3181e-06, -7.8082e-06,
          5.9128e-04, 3.0994e-05, 3.9673e-04, 5.4359e-05],
         [3.6240e-05, 1.8597e-04, -2.4796e-04, -4.7922e-05,
          9.6798e-05, -1.0061e-04, -2.0862e-06, 2.4557e-05,
          -5.3024e-04, -5.7220e-04, 2.9755e-04, -4.2439e-05,
          5.6839e-04, -5.7697e-05, 1.7643e-05, 3.3140e-05,
          -1.1063e-04, -3.0136e-04, 6.6757e-06, 3.1853e-04,
          4.4107e-05, 6.9427e-04, 2.9373e-04, 1.8406e-04,
          -2.3270e-04, 4.6492e-06, 4.1246e-05, 1.7357e-04,
          4.9973e-04, 3.7193e-04, 5.7220e-04, 3.3379e-05],
         [-1.0192e-05, 1.0824e-04, -4.7112e-04, -4.7207e-05,
          4.3106e-04, 1.1683e-04, -3.6430e-04, 7.0095e-05,
          4.9210e-04, -5.4598e-05, 8.0109e-05, -3.2187e-05,
          3.2806e-04, -2.1100e-05, -1.6809e-05, 4.5538e-05,
          -1.7452e-04, 2.4414e-04, -2.9564e-05, 4.5013e-04,
          -2.3246e-05, 2.2697e-04, 2.0313e-04, 3.4094e-05,
          2.9564e-04, 2.8729e-05, 1.0157e-04, -5.3167e-05,
          -9.0122e-05, -2.1839e-04, 1.8883e-04, 1.0848e-05],
         [-1.7548e-04, -2.5749e-05, 5.1975e-05, 3.0327e-04,
          -5.4550e-04, 2.8610e-04, -2.3079e-04, 2.9206e-05,
          -2.8610e-04, -2.4319e-04, -3.9339e-05, 7.4387e-05,
          8.4686e-04, -2.7299e-05, 1.6332e-05, -2.2888e-05,
          2.5749e-04, -1.9741e-04, -1.6022e-04, 3.5524e-05,
          7.9632e-05, 2.4986e-04, -7.0190e-04, -1.3161e-04,
          1.4591e-04, 4.6730e-05, 2.9325e-05, -3.1281e-04,
          -2.9373e-04, -1.0967e-04, 6.9046e-04, -3.7909e-05]], dtype=np.float16
    )

    rmsnorm_output1 = np.array(
        [[-9.1171e-04, -5.1270e-03, 1.4709e-02, 3.0823e-03,
          1.3351e-03, 1.2390e-02, 1.5503e-02, -2.5940e-04,
          -1.4587e-02, 3.4637e-03, -5.3101e-03, -2.0447e-03,
          1.7944e-02, 1.0633e-04, 7.2479e-05, -1.9989e-03,
          6.5002e-03, -3.3379e-04, 8.4305e-04, 2.6398e-03,
          -3.8757e-03, 3.6621e-03, -1.8463e-03, 3.5858e-03,
          -5.6624e-06, -1.3428e-03, 2.6131e-04, -3.5095e-04,
          2.0020e-02, 8.2016e-04, 1.3062e-02, 1.8005e-03],
         [5.1880e-04, 6.2256e-03, -7.1106e-03, -1.2054e-03,
          3.8300e-03, -3.4943e-03, -7.5531e-04, 6.8665e-04,
          -1.5320e-02, -1.8921e-02, 8.9722e-03, -1.4648e-03,
          1.8799e-02, -1.7319e-03, 5.1880e-04, 9.6512e-04,
          -3.8300e-03, -8.9111e-03, 5.2643e-04, 1.0437e-02,
          1.5182e-03, 2.2705e-02, 8.5449e-03, 5.4321e-03,
          -7.7515e-03, 2.4986e-04, 1.1063e-03, 5.7373e-03,
          1.4587e-02, 1.2390e-02, 1.8799e-02, 1.1292e-03],
         [-3.5248e-03, 5.7068e-03, -1.1841e-02, -8.4043e-06,
          1.8066e-02, 1.8921e-03, -1.5259e-02, 1.8311e-03,
          2.1973e-02, -7.2021e-03, 9.2697e-04, -1.8311e-03,
          1.5991e-02, -2.8801e-04, -6.8665e-04, 1.0910e-03,
          -7.5684e-03, 1.0742e-02, 7.0953e-04, 1.6968e-02,
          4.1962e-05, 1.3489e-02, 3.2196e-03, -5.1498e-04,
          6.8665e-03, 1.4725e-03, 2.2888e-03, 1.1861e-05,
          -8.2397e-03, -2.7008e-03, 1.0742e-02, 8.0872e-04],
         [-4.4556e-03, -1.0223e-03, 9.9945e-04, 8.3008e-03,
          -1.5869e-02, 8.2397e-03, -5.9509e-03, 8.7357e-04,
          -8.8501e-03, -6.0425e-03, -8.6975e-04, 2.1820e-03,
          2.2949e-02, -8.1253e-04, 4.7493e-04, -5.9128e-04,
          7.4768e-03, -5.8899e-03, -4.6997e-03, 6.2943e-04,
          2.1057e-03, 6.0730e-03, -1.9043e-02, -3.4332e-03,
          4.4250e-03, 1.2283e-03, 9.4604e-04, -8.9111e-03,
          -7.4463e-03, -3.6469e-03, 1.8555e-02, -1.1215e-03]], dtype=np.float16
    )

    rmsnorm_output2 = np.array(
        [[-2.7180e-05, -1.5259e-04, 4.4060e-04, 9.1553e-05,
          3.9816e-05, 3.6812e-04, 4.6158e-04, -7.7486e-06,
          -4.3678e-04, 1.0347e-04, -1.5831e-04, -6.0797e-05,
          5.3787e-04, 3.1590e-06, 2.1458e-06, -5.9128e-05,
          1.9455e-04, -9.8944e-06, 2.5153e-05, 7.8678e-05,
          -1.1539e-04, 1.0920e-04, -5.5075e-05, 1.0681e-04,
          -1.7881e-07, -4.0054e-05, 7.8082e-06, -1.0550e-05,
          5.9891e-04, 2.4438e-05, 3.9101e-04, 5.3644e-05],
         [1.6689e-05, 2.0027e-04, -2.2793e-04, -3.8624e-05,
          1.2302e-04, -1.1206e-04, -2.4199e-05, 2.2054e-05,
          -4.9210e-04, -6.0654e-04, 2.8801e-04, -4.7207e-05,
          6.0272e-04, -5.5313e-05, 1.6689e-05, 3.0994e-05,
          -1.2302e-04, -2.8419e-04, 1.6928e-05, 3.3379e-04,
          4.8876e-05, 7.3242e-04, 2.7466e-04, 1.7452e-04,
          -2.4796e-04, 8.0466e-06, 3.5286e-05, 1.8406e-04,
          4.6730e-04, 3.9673e-04, 6.0272e-04, 3.6240e-05],
         [-1.1015e-04, 1.7834e-04, -3.6812e-04, -2.3842e-07,
          5.6458e-04, 5.9128e-05, -4.7684e-04, 5.7220e-05,
          6.8665e-04, -2.2507e-04, 2.8968e-05, -5.7220e-05,
          4.9973e-04, -9.0003e-06, -2.1458e-05, 3.4094e-05,
          -2.3651e-04, 3.3569e-04, 2.2173e-05, 5.3024e-04,
          1.3113e-06, 4.2152e-04, 1.0061e-04, -1.6093e-05,
          2.1458e-04, 4.6015e-05, 7.1049e-05, 3.5763e-07,
          -2.5749e-04, -8.4400e-05, 3.3569e-04, 2.5272e-05],
         [-1.5926e-04, -3.6955e-05, 3.5763e-05, 2.9564e-04,
          -5.6839e-04, 2.9564e-04, -2.1267e-04, 3.1233e-05,
          -3.1662e-04, -2.1553e-04, -3.1233e-05, 7.8201e-05,
          8.2397e-04, -2.9206e-05, 1.7047e-05, -2.1219e-05,
          2.6703e-04, -2.1076e-04, -1.6785e-04, 2.2650e-05,
          7.5340e-05, 2.1839e-04, -6.8283e-04, -1.2302e-04,
          1.5926e-04, 4.3869e-05, 3.4094e-05, -3.2043e-04,
          -2.6703e-04, -1.3065e-04, 6.6757e-04, -4.0054e-05]], dtype=np.float16
    )

    return {
        "layernorm_output1": layernorm_output1,
        "layernorm_output2": layernorm_output2,
        "rmsnorm_output1": rmsnorm_output1,
        "rmsnorm_output2": rmsnorm_output2,
    }


GOLDEN_DATA = get_golden()
GPU_DATA = get_gpu_data()
